package topevery.syn.data.model;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import topevery.syn.data.model.codec.ModelTypeEnumCodec;

import java.time.LocalDateTime;

/**
 * @author Admin
 * @create 2023-02-14 10:55
 */
@Data
public class MeteorologicaData implements IGlbModel {

    @JSONField(name = "a")
    public Long gid;

    @JSONField(name = "b", serializeUsing = ModelTypeEnumCodec.class, deserializeUsing = ModelTypeEnumCodec.class)
    public ModelTypeEnum modelType = ModelTypeEnum.Meteorologica;


    @JSONField(name = "c")
    public String clientKey;

    /**
     * 氨气
     */
    /// <summary>
    /// 氨气浓度0.2ppm
    /// </summary>
    @JSONField(name = "d")
    public Double nh3;
    /// <summary>
    /// 二氧化硫
    /// </summary>
    @JSONField(name = "e")
    public Double so2;
    /// <summary>
    /// 二氧化氮
    /// </summary>
    @JSONField(name = "f")
    public Double no2;
    /// <summary>
    /// 一氧化碳
    /// </summary>
    @JSONField(name = "g")
    public Double co;
    /// <summary>
    ///  硫化氢
    /// </summary>
    @JSONField(name = "h")
    public Double h2s;
    /// <summary>
    /// 臭氧
    /// </summary>
    @JSONField(name = "i")
    public Double o3;
    /// <summary>
    /// TVOC
    /// </summary>
    @JSONField(name = "j")
    public Double tvoc;
    /// <summary>
    /// 大气压值
    /// </summary>
    @JSONField(name = "k")
    public Double pdqy;
    /// <summary>
    /// PM10
    /// </summary>
    @JSONField(name = "l")
    public Double pm10;
    /// <summary>
    /// PM25
    /// </summary>
    @JSONField(name = "m")
    public Double pm25;
    /// <summary>
    /// 温度值
    /// </summary>
    @JSONField(name = "n")
    public Double cwd;
    /// <summary>
    /// 湿度值
    /// </summary>
    @JSONField(name = "o")
    public Double rhsd;
    /// <summary>
    /// 风向
    /// </summary>
    @JSONField(name = "p")
    public Double ufx;
    /// <summary>
    /// 风速值
    /// </summary>
    @JSONField(name = "q")
    public Double ufs;

    @JSONField(name = "r")
    public LocalDateTime dbCreateDate;

    @JSONField(name = "s")
    public LocalDateTime clientDate;

    @Override
    public Long getGid() {
        return gid;
    }

    @Override
    public void setGid(Long gid) {
        this.gid = gid;
    }

    @Override
    public ModelTypeEnum getModelType() {
        return modelType;
    }

    @Override
    public void setModelType(ModelTypeEnum modelType) {
        this.modelType = modelType;
    }

    @Override
    public String getGlbModelKey() {
        return clientKey;
    }
}
